package com.zyasdk.broadcast;

import com.zyasdk.VUpdateUtil;
import com.zyasdk.handler.VersionHandler;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

/**
 * net change receive
 * 
 * @author Administrator
 * 
 */
public class NetChangeReceive extends BroadcastReceiver {
	/**
	 * action
	 */
	public static final String CONNECTIVITY_CHANGE_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";

	/**
	 * receive
	 */
	@Override
	public void onReceive(Context context, Intent intent) {
		String action = intent.getAction();
		if (TextUtils.equals(action, CONNECTIVITY_CHANGE_ACTION)
				&& !VersionHandler.getr_is_running) {// 网络变化的时候会发送通知
			VUpdateUtil.reset();
			return;
		}
	}

}
